/**
 * @name: auth.ts
 * @author: XU>.<CHEN
 * @date: 2022-02-27 21:59
 * @description：auth.ts
 * @update: 2022-02-27 21:59
 */

// @ts-ignore
import Cookies from 'vue-cookie'

const tokenKey = 'token'

export function getToken() {
  return Cookies.get(tokenKey)
}

export function setToken(token: string) {
  return Cookies.set(tokenKey, token)
}

export function removeToken() {
  return Cookies.delete(tokenKey)
}

export function setCookies(key: string, value: string) {
  Cookies.set(key, value)
}
